﻿@using ECGadmin.Common
@using ECGadmin.WebUI.CustomHelpers
@using ECGadmin.WebUI.Models
@model PositionDto
@{
    ViewBag.Title = "EditPosition";
    Layout = "~/Views/Shared/_layout.cshtml";
}

<nav>
    <div id="jCrumbs" class="breadCrumb module">
        <ul>
            <li><a href="@Url.Action("Index", "Home")"><i class="bootstrap icon-home"></i></a></li>
            <li><a href="@Url.Action("Index", "Banner")">Banner</a> </li>
            <li><a href="@Url.Action("PositionList", "Banner")">Danh sách vị trí</a></li>
            <li><a href="javascript:void(0);">Thêm vị trí banner</a></li>
        </ul>
    </div>
</nav>

<div class="toolBox">
    @Html.ToolBox(new List<object> { new Edit { ClassCss = "Edit", ActionName = "Javascript:void(0)" } ,
    new Back{ClassCss = "Back",ActionName = @Url.Action("PositionList","Banner") } })
</div>

@using (Html.BeginForm("EditPosition", "Banner", FormMethod.Post))
{
    @Html.HiddenFor(m => m.PositionId)
    @Html.HiddenFor(m => m.PositionKey)
    @Html.HiddenFor(m => m.CreateDate)
    <div class="box-Info">
        <div class="Info-header">
            <span>Thêm vị trí mới</span>
        </div>

        <div class="Info-body ib-infopro">
            <div>@Html.ValidationMessage("ErrorSummary")</div>
            <table cellpadding="0" cellspacing="0" width="100%" border="0" class="table-info">
                <tr>
                    <td class="tInfoLeft">Tên vị trí
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Name)
                        @Html.ValidationMessageFor(m => m.Name)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">Thuộc trang
                    </td>
                    <td class="tInfoRight">
                        @Html.DropDownListFor(m => m.PageId, new SelectList((List<PageDto>)ViewBag.PageList, "PageId", "Name"))
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">Thứ tự
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.Order)
                        @Html.ValidationMessageFor(m => m.Order)
                    </td>
                </tr>
            </table>
        </div>
    </div>
}

@section scripts
{
    @Scripts.Render("~/bundles/jqueryval")
    <script>
        SubmitFormUseToolBox($('ul li.Edit a'), $('form'));
    </script>
}

